package top.zackyoung.cloud2020.user.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author ZackYoung
 * @version 1.0
 * @description
 * @date 2021/5/12 20:41
 */
@RestController
public class TestController {
    @RequestMapping("/test/{name}")
    public String test(@PathVariable String name, HttpServletRequest req) {
        return "My name is " + name + ",ip=" + req.getLocalAddr();
    }
}
